package com.fengmi.sso.controller;


import com.fengmi.entity.sso.SysUser;
import com.fengmi.entity.vo.ResultVO;
import com.fengmi.sso.service.ISysUserService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.*;

/**
 * <p>
 * 用户信息表 前端控制器
 * </p>
 *
 * @author 小马
 * @since 2021-10-20
 */
@RestController
@RequestMapping("/sso")
public class SysUserController {
    @Autowired
    private ISysUserService sysUserService;
    @PostMapping("login")
    public ResultVO login(@RequestBody SysUser sysUser){
        return sysUserService.login(sysUser);
    }

    @RequestMapping("verifyToken")
    public ResultVO verifyToken(@RequestHeader("token")String token){
        return sysUserService.verifyToken(token);
    }
}
